from threading import Thread

result = []
zero = 0


def writer():
    global zero
    for i in range(10000000):
        result.append(1)
        result.append(-1)
        zero += 1
        zero -= 1


t_array = []
for i in range(2):
    t = Thread(target=writer)
    t.start()
    t_array.append(t)
[t.join() for t in t_array]
print(sum(result))
print(zero)
